package com.xiaoye.app.Test;

import java.util.regex.Pattern;

public class YanZheng {

	public static void main(String[] args) {
		//fun("16262982464");
		fun("321323199404133916");

	}
	public static void fun(String str){
		String reg = "^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$";
		boolean a = Pattern.matches(reg, str);
		System.out.println(a);
		String checkIDNumber = "(^\\d{18}$)|(^\\d{15}$)";
		boolean b = Pattern.matches(checkIDNumber, str);
		System.out.println(b);
	}

}
